﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace project1
{
    class Program
    {
        static void Main(string[] args)
        {
            Prime primenum = new Prime();
            Console.WriteLine("请输入一个数字：");
            int a = int.Parse(Console.ReadLine());
            for (int i = 2; i <= a; i++)
            {
                if (a % i == 0)
                {
                    primenum.Primenum(i);
                }
            }
            Console.ReadKey();
        }
    }

    class Prime
    {
        public void Primenum(int input)
        {
            for (int i = 2; i < input; i++)
            {
                if (input % i == 0) return;
            }
            Console.WriteLine("{0} ", input);
        }

    }
}
